/**
 *
 * @see org.osflash.signals.events.IEvent
 * Documentation for the event interface being maintained in IEvent to avoid duplication for now.
 */
package org.osflash.signals.events;

import org.osflash.signals.IPrioritySignal;

class GenericEvent implements IEvent {
	public var signal(getSignal, setSignal) : IPrioritySignal;
	public var target(getTarget, setTarget) : Dynamic;
	public var currentTarget(getCurrentTarget, setCurrentTarget) : Dynamic;
	public var bubbles(getBubbles, setBubbles) : Bool;

	var _bubbles : Bool;
	var _target : Dynamic;
	var _currentTarget : Dynamic;
	var _signal : IPrioritySignal;
	public function new(bubbles : Bool = false) {
		_bubbles = bubbles;
	}

	/** @inheritDoc */
	public function getSignal() : IPrioritySignal {
		return _signal;
	}

	public function setSignal(value : IPrioritySignal) : IPrioritySignal {
		_signal = value;
		return value;
	}

	/** @inheritDoc */
	public function getTarget() : Dynamic {
		return _target;
	}

	public function setTarget(value : Dynamic) : Dynamic {
		_target = value;
		return value;
	}

	/** @inheritDoc */
	public function getCurrentTarget() : Dynamic {
		return _currentTarget;
	}

	public function setCurrentTarget(value : Dynamic) : Dynamic {
		_currentTarget = value;
		return value;
	}

	/** @inheritDoc */
	public function getBubbles() : Bool {
		return _bubbles;
	}

	public function setBubbles(value : Bool) : Bool {
		_bubbles = value;
		return value;
	}

	/** @inheritDoc */
	public function clone() : IEvent {
		return new GenericEvent(_bubbles);
	}

}

